// 查询所有摄像头
import qs from 'qs'
import request from '@/plugins/axios/rtsp'
import type { INegotiatModel } from '@/common/types/rtsp'

// 查询所有视频
export function getMonitors() {
  return request({
    url: '/streams',
    method: 'get'
  })
}

export const handleNegotiation = (params: INegotiatModel) => {
  return request({
    url: params.url,
    method: 'post',
    data:qs.stringify({
      data: params.data
    })
  })
}
export const editMonitors = params => {
  return request({
    url: '/stream/' + params.uuid + '/edit',
    method: 'post'
  })
}
export const deleteMonitors = id => {
  return request({
    url: '/stream/' + id + '/delete',
    method: 'get'
  })
}
export const reloadMonitors = params => {
  return request({
    url: '/stream/' + params.uuid + '/reload',
    method: 'get'
  })
}
export const infoMonitors = params => {
  return request({
    url: '/stream/' + params.uuid + '/info',
    method: 'get'
  })
}
